package net.ui.model.panel;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PanelElementBean {

	private String id;

	private List<PanelElementItemBean> items = new ArrayList<PanelElementItemBean>();

	private Map<String, PanelElementItemBean> itemMap = new HashMap<String, PanelElementItemBean>();

	public List<PanelElementItemBean> getItems() {
		return items;
	}

	public void setItems(List<PanelElementItemBean> items) {
		this.items = items;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void addItem(String name,String value) {
		PanelElementItemBean itemBean = new PanelElementItemBean();
		itemBean.setName(name);
		itemBean.setValue(value);
		this.items.add(itemBean);
		this.itemMap.put(itemBean.getName(), itemBean);
	}

	public Map<String, PanelElementItemBean> getItemMap() {
		return itemMap;
	}

}
